﻿module Sustainalytics.Routing {

    export class RouteInfoMap {

        private map: any = {};

        public getRouteInfo(path: string): IRouteInfo {
            var ctx = this;

            if (!path) {
                return null;
            }

            return ctx.map[path.toLowerCase()];
        }

        public addRouteInfo(routeInfo: IRouteInfo): RouteInfoMap {
            var ctx = this;

            ctx.map[routeInfo.path.toLowerCase()] = routeInfo;

            return ctx;
        }
    }
}